public class Operator {
    public static void main1(String[] args) {
        //算术运算符
        System.out.println(5 / 2);
        System.out.println(5 / 2.0);
        System.out.println(5 % 2);
        System.out.println(5 % 2.0);
        System.out.println(5.0 % 2);
        System.out.println(5.0 % 2.0);
        System.out.println(" ");
    }

    public static void main2(String[] args) {
        //增量运算符
        int a = 5;
        long b = 10;
        // a = a +b;
        a+= b; //自动转换
        System.out.println(a);
        a-= b;
        a*= b;
        System.out.println(a);
        System.out.println(a);
        System.out.println(a);
        System.out.println(" ");
    }

    public static void main3(String[] args) {
        //自增运算符
        int c = 5;
        System.out.println(c++);
        System.out.println(++c);
        System.out.println(" ");
        //混合使用自增运算符
        System.out.println(c++ + ++c);
        // 自减运算符
        int d = 5;
        System.out.println(d--);
        System.out.println(--d);
        System.out.println(" ");
        // 混合使用自减运算符
        System.out.println(d-- + --d);
        System.out.println(" ");
    }

    public static void main(String[] args) {
        //关系运算符
        int a = 5;
        int b = 10;
        System.out.println(a == b);
        System.out.println(a != b);
        System.out.println(a > b);
        System.out.println(a < b);
        System.out.println(a >= b);
        System.out.println(a <= b);
        System.out.println(" ");
    }

    }

